'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	//event为客户端上传的参数
	const {
		content,
		imgList,
		userId
	} = event;

	await db.collection('feedback').add({
		user_id: userId,
		content,
		feedback_img_list: imgList

	})

	//返回数据给客户端
	return {
		code: 0,
		data: {
			msg: "您反馈的内容已提交"
		}
	}
};
